package cn.edu.nju.software.cdiy.dao;

import java.util.List;
import java.util.Map;

import cn.edu.nju.software.cdiy.bean.Scheme;
import cn.edu.nju.software.cdiy.util.Item;
import cn.edu.nju.software.cdiy.util.SortType;
import cn.edu.nju.software.cdiy.util.SortWay;

public interface SchemeDao {

	public Scheme save(Scheme scheme);
	
	public boolean deleteSchemeByState(long id);

	public Scheme getSchemeById(Long id);

	/*
	 * 取出某个用户的攒机方案，按时间排序
	 */
	public List<Scheme> loadUserScheme(Long userid);

	public List<Scheme> loadAllScheme();

	/*
	 * ' 查找Scheme方案
	 */
	public List<Scheme> searchBySchemeName(String name);

	public long searchBySchemeNameInteger(String name);
	
	public List<Scheme> getFourScheme(int hardwareid, String hardwareType);

	// 取出intel品牌的方案
	public List<Scheme> getIntelBrand();

	public List<Scheme> getOrderByHot();

	public Map<String,List<Item>> getFilterBoard();
	
	public List<Scheme> filter(List<Integer> brandList, List<Integer> priceList,
			List<Integer> typeList, SortType st, SortWay sw, int page);

	public long getFilterResultLength(List<Integer> brandList, List<Integer> priceList, List<Integer> typeList);

	Map<String,List<Scheme>> getBrandLists();

	Map<String,List<Scheme>>  getPriceLists();
	
	Map<String,List<Scheme>>  getTypeLists();

	List<Scheme> getSaleList();

	List<Scheme> getTimeList();
	
	Map<String,List<Scheme>> getRelatedLists(Scheme scheme);

}
